import request from '@/utils/request'

// 查询采购需求单列表
export function listNeedcard(query) {
  return request({
    url: '/mes/needcard/list',
    method: 'get',
    params: query
  })
}

// 查询采购需求单详细
export function getNeedcard(id) {
  return request({
    url: '/mes/needcard/' + id,
    method: 'get'
  })
}

// 新增采购需求单
export function addNeedcard(data) {
  return request({
    url: '/mes/needcard',
    method: 'post',
    data: data
  })
}

// 修改采购需求单
export function updateNeedcard(data) {
  return request({
    url: '/mes/needcard',
    method: 'put',
    data: data
  })
}

// 删除采购需求单
export function delNeedcard(id) {
  return request({
    url: '/mes/needcard/' + id,
    method: 'delete'
  })
}
